Skip to main content
Glama
dennisonbertram

Brex MCP Server

team-swagger (1).json67.6 kB
{ "openapi": "3.0.1", "info": { "title": "Team API", "description": "\nThe team API lets you manage users, departments, locations, and cards.\n", "contact": { "name": "Admin", "url": "https://brex.com", "email": "developer-access@brex.com" }, "version": "1.0" }, "servers": [ { "url": "https://platform.brexapis.com", "description": "Production" }, { "url": "https://platform.staging.brexapps.com", "description": "Staging (Note: This is not a sandbox. It will not work with customer tokens.)" } ], "security": [ { "OAuth2": [] } ], "tags": [ { "name": "Users", "description": "Endpoints for user management." }, { "name": "Locations", "description": "Endpoints for location management." }, { "name": "Departments", "description": "Endpoints for department management." }, { "name": "Titles", "description": "Endpoints for title management." }, { "name": "Cards", "description": "Endpoints for card management." }, { "name": "Legal Entities", "description": "Endpoints for legal entities." } ], "paths": { "/v2/cards": { "get": { "tags": [ "Cards" ], "summary": "\nList cards\n", "description": "\nLists all cards by a `user_id`.\nOnly cards with `limit_type = CARD` have `spend_controls`\n", "operationId": "listCardsByUserId", "parameters": [ { "name": "user_id", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true } } ], "responses": { "200": { "description": "listCardsByUserId 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_Card_" } } } } }, "security": [ { "OAuth2": [ "cards.readonly", "cards" ] } ] }, "post": { "tags": [ "Cards" ], "summary": "\nCreate card\n", "description": "\nCreates a new card.\nThe `spend_controls` field is required when `limit_type` = `CARD`.\nThe `mailing_address` field is required for physical cards and is the shipping address used to send the card; it is not the same as the billing and mailing address used for online purchases.\nThe first 2 lines of this address must be under 60 characters long. Each user can only have up to 10 active physical cards.\nFor Empower accounts, this endpoint requires budget management. If your account does not have access to budget management features, a 403 response status will be returned. \nIf this is the case and you want to gain access to this endpoint, please contact Brex support.\n", "operationId": "createCard", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCardRequest" } } }, "required": true }, "responses": { "200": { "description": "createCard 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Card" } } } } }, "security": [ { "OAuth2": [ "cards" ] } ] } }, "/v2/cards/{id}": { "get": { "tags": [ "Cards" ], "summary": "\nGet card\n", "description": "\nRetrieves a card by ID. Only cards with `limit_type = CARD` have `spend_controls`\n", "operationId": "getCardById", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "getCardById 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Card" } } } } }, "security": [ { "OAuth2": [ "cards", "cards.readonly" ] } ] }, "put": { "tags": [ "Cards" ], "summary": "\nUpdate card\n", "description": "\nUpdate an existing vendor card\n", "operationId": "updateCard", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCardRequest" } } }, "required": true }, "responses": { "200": { "description": "updateCard 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Card" } } } } }, "security": [ { "OAuth2": [ "cards" ] } ] } }, "/v2/cards/{id}/lock": { "post": { "tags": [ "Cards" ], "summary": "\nLock card\n", "description": "\nLocks an existing, unlocked card. And the card owner will receive a notification about it.\n", "operationId": "lockCard", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LockCardRequest" } } }, "required": true }, "responses": { "200": { "description": "lockCard 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Card" } } } } }, "security": [ { "OAuth2": [ "cards" ] } ] } }, "/v2/cards/{id}/pan": { "get": { "tags": [ "Cards" ], "summary": "\nGet card number\n", "description": "\nRetrieves card number, CVV, and expiration date of a card by ID.\n", "operationId": "getCardNumber", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "getCardNumber 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CardNumberResponse" } } } } }, "security": [ { "OAuth2": [ "cards.pan" ] } ], "servers": [ { "url": "https://secure-platform.brexapis.com", "description": "Production" }, { "url": "https://secure-platform.staging.brexapps.com", "description": "Staging (Note: This is not a sandbox. It will not work with customer tokens.)" } ] } }, "/v2/cards/{id}/secure_email": { "post": { "tags": [ "Cards" ], "summary": "\nCreate secure email to send card number \n", "description": "\nCreates a secure email to send card number, CVV, and expiration date of a card by ID to the specified email.\n\nThis endpoint is currently gated. If you would like to request access, please reach out to\ndeveloper-access@brex.com\n", "operationId": "emailCardNumber", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SecureEmailForCardDetailsRequest" } } }, "required": true }, "responses": { "200": { "description": "emailCardNumber 200 response" } }, "security": [ { "OAuth2": [ "cards.pan" ] } ] } }, "/v2/cards/{id}/terminate": { "post": { "tags": [ "Cards" ], "summary": "\nTerminate card\n", "description": "\nTerminates an existing card. The card owner will receive a notification about it.\n", "operationId": "terminateCard", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerminateCardRequest" } } }, "required": true }, "responses": { "200": { "description": "terminateCard 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Card" } } } } }, "security": [ { "OAuth2": [ "cards" ] } ] } }, "/v2/cards/{id}/unlock": { "post": { "tags": [ "Cards" ], "summary": "\nUnlock card\n", "description": "\nUnlocks an existing card.\n", "operationId": "unlockCard", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "unlockCard 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Card" } } } } }, "security": [ { "OAuth2": [ "cards" ] } ] } }, "/v2/company": { "get": { "tags": [ "Companies" ], "summary": "\nGet company\n", "description": "\nThis endpoint returns the company associated with the OAuth2 access token.\n", "operationId": "getCompany", "parameters": [], "responses": { "200": { "description": "getCompany 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyResponse" } } } } }, "security": [ { "OAuth2": [ "companies.readonly" ] } ] } }, "/v2/departments": { "get": { "tags": [ "Departments" ], "summary": "\nList departments\n", "description": "\nThis endpoint lists all departments.\n", "operationId": "listDepartments", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true } }, { "name": "name", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "listDepartments 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_DepartmentResponse_" } } } } }, "security": [ { "OAuth2": [ "departments", "departments.readonly" ] } ] }, "post": { "tags": [ "Departments" ], "summary": "\nCreate department\n", "description": "\nThis endpoint creates a new department\n", "operationId": "createDepartment", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDepartmentRequest" } } }, "required": true }, "responses": { "200": { "description": "createDepartment 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DepartmentResponse" } } } } }, "security": [ { "OAuth2": [ "departments" ] } ] } }, "/v2/departments/{id}": { "get": { "tags": [ "Departments" ], "summary": "\nGet department\n", "description": "\nThis endpoint gets a department by ID.\n", "operationId": "getDepartmentById", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "getDepartmentById 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DepartmentResponse" } } } } }, "security": [ { "OAuth2": [ "departments", "departments.readonly" ] } ] } }, "/v2/legal_entities": { "get": { "tags": [ "Legal Entities" ], "summary": "\nList legal entities\n", "description": "\nList legal entities for the account.\n", "operationId": "listLegalEntities", "parameters": [ { "name": "cursor", "in": "query", "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "format": "int32", "nullable": true } } ], "responses": { "200": { "description": "listLegalEntities 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_LegalEntity_" } } } } }, "security": [ { "OAuth2": [ "legal_entities", "legal_entities.readonly" ] } ] } }, "/v2/legal_entities/{id}": { "get": { "tags": [ "Legal Entities" ], "summary": "\nGet legal entity\n", "description": "\nGet a legal entity by its ID.\n", "operationId": "getLegalEntity", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "getLegalEntity 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LegalEntity" } } } } }, "security": [ { "OAuth2": [ "legal_entities", "legal_entities.readonly" ] } ] } }, "/v2/locations": { "get": { "tags": [ "Locations" ], "summary": "\nList locations\n", "description": "\nThis endpoint lists all locations.\n", "operationId": "listLocations", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true } }, { "name": "name", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "listLocations 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_LocationResponse_" } } } } }, "security": [ { "OAuth2": [ "locations", "locations.readonly" ] } ] }, "post": { "tags": [ "Locations" ], "summary": "\nCreate location\n", "description": "\nThis endpoint creates a new location.\n", "operationId": "createLocation", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateLocationRequest" } } }, "required": true }, "responses": { "200": { "description": "createLocation 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationResponse" } } } } }, "security": [ { "OAuth2": [ "locations" ] } ] } }, "/v2/locations/{id}": { "get": { "tags": [ "Locations" ], "summary": "\nGet location\n", "description": "\nThis endpoint gets a location by ID.\n", "operationId": "getLocationById", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "getLocationById 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationResponse" } } } } }, "security": [ { "OAuth2": [ "locations", "locations.readonly" ] } ] } }, "/v2/titles": { "get": { "tags": [ "Titles" ], "summary": "\nList titles\n", "description": "\nThis endpoint lists all titles.\n", "operationId": "listTitles", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true } }, { "name": "name", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } } ], "responses": { "200": { "description": "listTitles 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_TitleResponse_" } } } } }, "security": [ { "OAuth2": [ "titles", "titles.readonly" ] } ] }, "post": { "tags": [ "Titles" ], "summary": "\nCreate title\n", "description": "\nThis endpoint creates a new title\n", "operationId": "createTitle", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTitleRequest" } } }, "required": true }, "responses": { "200": { "description": "createTitle 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TitleResponse" } } } } }, "security": [ { "OAuth2": [ "titles" ] } ] } }, "/v2/titles/{id}": { "get": { "tags": [ "Titles" ], "summary": "\nGet title\n", "description": "\nThis endpoint gets a title by ID.\n", "operationId": "getTitleById", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "getTitleById 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TitleResponse" } } } } }, "security": [ { "OAuth2": [ "titles", "titles.readonly" ] } ] } }, "/v2/users": { "get": { "tags": [ "Users" ], "summary": "\nList users\n", "description": "\nThis endpoint lists all users. To find a user id by email, you can filter using the `email` query parameter.\n", "operationId": "listUsers", "parameters": [ { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "nullable": true } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "nullable": true } }, { "name": "email", "in": "query", "required": false, "schema": { "type": "string", "description": "Currently only support filtering by a single email or a single remote_display_id.", "nullable": true } }, { "name": "remote_display_id", "in": "query", "required": false, "schema": { "type": "string", "description": "Currently only support filtering by a single email or a single remote_display_id.", "nullable": true } }, { "name": "expand[]", "in": "query", "required": false, "schema": { "type": "array", "description": "\nExpandable fields that can be included in the response by passing in a query parameter e.g. ?expand[]=limit\n", "nullable": true, "items": { "type": "string" } } } ], "responses": { "200": { "description": "listUsers 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_UserResponse_" } } } } }, "security": [ { "OAuth2": [ "users", "users.readonly" ] } ] }, "post": { "tags": [ "Users" ], "summary": "\nInvite user\n", "description": "\nThis endpoint invites a new user as an employee.\nTo update user's role, check out [this article](https://support.brex.com/how-do-i-change-another-user-s-role/).\n", "operationId": "createUser", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserRequest" } } }, "required": true }, "responses": { "200": { "description": "createUser 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } } } } }, "security": [ { "OAuth2": [ "users" ] } ] } }, "/v2/users/me": { "get": { "tags": [ "Users" ], "summary": "\nGet current user\n", "description": "\nThis endpoint returns the user associated with the OAuth2 access token.\n", "operationId": "getMe", "parameters": [], "responses": { "200": { "description": "getMe 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } } } } }, "security": [ { "OAuth2": [ "users", "users.readonly" ] } ] } }, "/v2/users/{id}": { "get": { "tags": [ "Users" ], "summary": "\nGet user\n", "description": "\nThis endpoint gets a user by ID.\n", "operationId": "getUserById", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "getUserById 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } } } } }, "security": [ { "OAuth2": [ "users", "users.readonly" ] } ] }, "put": { "tags": [ "Users" ], "summary": "\nUpdate user\n", "description": "\nThis endpoint updates a user. Any parameters not provided will be left unchanged.\n", "operationId": "updateUser", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRequest" } } }, "required": true }, "responses": { "200": { "description": "updateUser 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponse" } } } } }, "security": [ { "OAuth2": [ "users" ] } ] } }, "/v2/users/{id}/limit": { "get": { "tags": [ "Users" ], "summary": "\nGet limit for the user\n", "description": "\nThis endpoint gets the monthly limit for the user including the monthly available limit.\n", "operationId": "getUserLimit", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "getUserLimit 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserLimitResponse" } } } } }, "security": [ { "OAuth2": [ "users", "users.readonly" ] } ] }, "post": { "tags": [ "Users" ], "summary": "\nSet limit for the user\n", "description": "\nThis endpoint sets the monthly limit for a user. \nThe limit amount must be non-negative. \nTo unset the monthly limit of the user, just set `monthly_limit` to null.\n", "operationId": "setUserLimit", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "type": "string", "nullable": true } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetUserLimitRequest" } } }, "required": true }, "responses": { "200": { "description": "setUserLimit 200 response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserLimitResponse" } } } } }, "security": [ { "OAuth2": [ "users" ] } ] } } }, "components": { "schemas": { "AccountType": { "type": "string", "enum": [ "BREX_CLASSIC", "BREX_EMPOWER" ] }, "Address": { "type": "object", "properties": { "line1": { "type": "string", "description": "Address line 1, no PO Box.", "nullable": true }, "line2": { "type": "string", "description": "Address line 2 (e.g., apartment, suite, unit, or building).", "nullable": true }, "city": { "type": "string", "description": "City, district, suburb, town, or village.", "nullable": true }, "state": { "type": "string", "description": "For US-addressed the 2-letter State abbreviation. For international-addresses the county, providence, or region.", "nullable": true }, "country": { "type": "string", "description": "Two-letter country code (ISO 3166-1 alpha-2).", "nullable": true }, "postal_code": { "type": "string", "description": "ZIP or postal code.", "nullable": true }, "phone_number": { "type": "string", "description": "Phone number.", "nullable": true } }, "description": "Company business address (must be in the US; no PO box or virtual/forwarding addresses allowed)." }, "Card": { "required": [ "billing_address", "card_name", "expiration_date", "id", "last_four", "limit_type", "owner" ], "type": "object", "properties": { "id": { "type": "string" }, "owner": { "$ref": "#/components/schemas/CardOwner" }, "status": { "allOf": [ { "$ref": "#/components/schemas/CardStatus" }, { "nullable": true } ] }, "last_four": { "type": "string" }, "card_name": { "type": "string" }, "card_type": { "allOf": [ { "$ref": "#/components/schemas/CardType" }, { "nullable": true } ] }, "limit_type": { "$ref": "#/components/schemas/LimitType" }, "spend_controls": { "allOf": [ { "$ref": "#/components/schemas/SpendControl" }, { "nullable": true } ] }, "billing_address": { "$ref": "#/components/schemas/Address" }, "mailing_address": { "allOf": [ { "$ref": "#/components/schemas/Address" }, { "nullable": true } ] }, "expiration_date": { "$ref": "#/components/schemas/CardExpiration" }, "has_been_transferred": { "type": "boolean", "description": "\nIndicates whether a card has been transferred. Transferred cards have a spending restriction: we only allow transactions \\\nat online vendors where this card was previously used before the transfer.\n" }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "\nSet of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here.\nLimitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters. \n", "nullable": true }, "budget_id": { "type": "string", "description": "The ID of the budget currently assigned to the card.", "nullable": true } }, "description": "\nOnly cards with limit_type = CARD have spend_controls\n" }, "CardAttributePreferences": { "type": "object", "properties": { "three_domain_secure_enabled_preference": { "allOf": [ { "$ref": "#/components/schemas/ThreeDomainSecureEnabledPreference" }, { "nullable": true } ] } } }, "CardExpiration": { "required": [ "month", "year" ], "type": "object", "properties": { "month": { "type": "integer", "format": "int32" }, "year": { "type": "integer", "format": "int32" } }, "description": "\nCard expiration year and month. Cards expire on the last day of the expiration month.\n\nThe expiration date is in UTC for cards starting with 555671, 428803 and 485932.\nAnd the expiration date is in PST for cards starting with 511572.\n" }, "CardNumberResponse": { "required": [ "cvv", "expiration_date", "id", "number", "holder_name" ], "type": "object", "properties": { "id": { "type": "string" }, "number": { "type": "string" }, "cvv": { "type": "string" }, "expiration_date": { "$ref": "#/components/schemas/CardExpiration" }, "holder_name": { "type": "string" } }, "description": "\nCard number, CVV, and expiration date of a card.\n" }, "CardOwner": { "type": "object", "discriminator": { "propertyName": "type", "mapping": { "USER": "#/components/schemas/UserOwner" } }, "oneOf": [ { "$ref": "#/components/schemas/UserOwner" } ] }, "CardStatus": { "type": "string", "enum": [ "ACTIVE", "SHIPPED", "LOCKED", "TERMINATED" ] }, "CardType": { "type": "string", "enum": [ "VIRTUAL", "PHYSICAL" ] }, "ChangeCardReason": { "type": "string", "description": "\nReason for card termination.\n", "enum": [ "CARD_DAMAGED", "CARD_LOST", "CARD_NOT_RECEIVED", "DO_NOT_NEED_PHYSICAL_CARD", "DO_NOT_NEED_VIRTUAL_CARD", "FRAUD", "OTHER" ] }, "CompanyResponse": { "required": [ "accountType", "id", "legal_name", "mailing_address" ], "type": "object", "properties": { "id": { "type": "string" }, "legal_name": { "type": "string" }, "mailing_address": { "$ref": "#/components/schemas/Address" }, "accountType": { "$ref": "#/components/schemas/AccountType" } } }, "CreateCardRequest": { "required": [ "card_name", "card_type", "limit_type", "owner" ], "type": "object", "properties": { "owner": { "$ref": "#/components/schemas/CardOwner" }, "card_name": { "minLength": 1, "type": "string" }, "card_type": { "$ref": "#/components/schemas/CardType" }, "limit_type": { "$ref": "#/components/schemas/LimitType" }, "spend_controls": { "allOf": [ { "$ref": "#/components/schemas/SpendControlRequest" }, { "nullable": true } ] }, "mailing_address": { "allOf": [ { "$ref": "#/components/schemas/Address" }, { "nullable": true } ] }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "\nSet of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here.\nLimitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters. \n", "nullable": true }, "card_attribute_preferences": { "allOf": [ { "$ref": "#/components/schemas/CardAttributePreferences" }, { "nullable": true } ] } }, "description": "\nThe `spend_controls` field is required when `limit_type` = `CARD`.\nThe `shipping_address` field is required for physical cards, and the first 2 lines of the address must be under 60 characters long.\n" }, "CreateDepartmentRequest": { "required": [ "name" ], "type": "object", "properties": { "name": { "minLength": 1, "type": "string", "description": "Name of the department" }, "description": { "type": "string", "description": "Description of the department", "nullable": true } } }, "CreateLocationRequest": { "required": [ "name" ], "type": "object", "properties": { "name": { "minLength": 1, "type": "string", "description": "Name of the location" }, "description": { "type": "string", "description": "Description of the location", "nullable": true } } }, "CreateTitleRequest": { "required": [ "name" ], "type": "object", "properties": { "name": { "minLength": 1, "type": "string", "description": "Name of the title" } } }, "CreateUserRequest": { "required": [ "email", "first_name", "last_name" ], "type": "object", "properties": { "first_name": { "minLength": 1, "type": "string" }, "last_name": { "minLength": 1, "type": "string" }, "email": { "type": "string", "format": "email" }, "manager_id": { "type": "string", "nullable": true }, "department_id": { "type": "string", "nullable": true }, "location_id": { "type": "string", "nullable": true }, "title_id": { "type": "string", "nullable": true }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "The metadata or customized attributes of the user. Maximum number of entries: 100", "nullable": true } } }, "DepartmentResponse": { "required": [ "id", "name" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string", "description": "Name of the department" }, "description": { "type": "string", "description": "Description of the department", "nullable": true } } }, "LegalEntity": { "title": "\nLegal Entity\n", "required": [ "billingAddress", "createdAt", "displayName", "id", "status" ], "type": "object", "properties": { "id": { "type": "string", "description": "\nThe ID of this legal entity.\n" }, "displayName": { "type": "string", "description": "\nThe display name of this legal entity.\n" }, "billingAddress": { "allOf": [ { "$ref": "#/components/schemas/Address" }, { "description": "\nThe billing address of this legal entity. Also used as billing address for cards issued to users who belong to this entity.\n" } ] }, "createdAt": { "type": "string", "description": "\nTimestamp, in UTC, when this legal entity was created.\n", "format": "date-time" }, "status": { "allOf": [ { "$ref": "#/components/schemas/LegalEntityStatus" }, { "description": "\nThe current status of this legal entity.\n" } ] }, "isDefault": { "type": "boolean", "description": "\nWhether this is the default entity of the account.\n" } }, "description": "\nA Brex legal entity.\n" }, "LegalEntityStatus": { "type": "string", "description": "\nThe possible statuses for an entity's verification in Brex.\n", "enum": [ "UNSUBMITTED", "UNVERIFIED", "IN_PROGRESS", "VERIFIED", "REJECTED" ] }, "LimitType": { "type": "string", "description": "\n`limit_type = CARD` for vendor cards. Vendor cards must have a `card_type` of `VIRTUAL` \nand do not rely on the user specific limit. \n\nFor corporate cards, `limit_type = USER`.\n\nLearn more about different card types [here](https://support.brex.com/what-are-the-different-types-of-cards-i-can-get/).\n", "enum": [ "CARD", "USER" ] }, "LocationResponse": { "required": [ "id", "name" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string", "description": "Name of the location" }, "description": { "type": "string", "description": "Description of the location", "nullable": true } } }, "LockCardRequest": { "required": [ "reason" ], "type": "object", "properties": { "description": { "type": "string", "description": "Description for locking a card", "nullable": true }, "reason": { "$ref": "#/components/schemas/ChangeCardReason" } }, "description": "Parameters for locking a card." }, "Money": { "type": "object", "properties": { "amount": { "type": "integer", "description": "The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents.", "format": "int64" }, "currency": { "type": "string", "description": "The type of currency, in ISO 4217 format. Default to USD if not specified", "nullable": true } }, "description": "\nMoney fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination\nof the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.\n" }, "OwnerType": { "type": "string", "enum": [ "USER" ] }, "Page_Card_": { "required": [ "items" ], "type": "object", "properties": { "next_cursor": { "type": "string", "nullable": true }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/Card" } } } }, "Page_DepartmentResponse_": { "required": [ "items" ], "type": "object", "properties": { "next_cursor": { "type": "string", "nullable": true }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/DepartmentResponse" } } } }, "Page_LegalEntity_": { "required": [ "items" ], "type": "object", "properties": { "next_cursor": { "type": "string", "nullable": true }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/LegalEntity" } } } }, "Page_LocationResponse_": { "required": [ "items" ], "type": "object", "properties": { "next_cursor": { "type": "string", "nullable": true }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/LocationResponse" } } } }, "Page_TitleResponse_": { "required": [ "items" ], "type": "object", "properties": { "next_cursor": { "type": "string", "nullable": true }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/TitleResponse" } } } }, "Page_UserResponse_": { "required": [ "items" ], "type": "object", "properties": { "next_cursor": { "type": "string", "nullable": true }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/UserResponse" } } } }, "SecureEmailForCardDetailsRequest": { "type": "object", "properties": { "recipient_email": { "type": "string", "description": "Email address to send card details to" }, "sender_name": { "type": "string", "description": "Sender name. Shows up in the subject of the email" }, "message": { "type": "string", "description": "Message to send with the card details", "nullable": true }, "expiry_days": { "maximum": 30, "type": "integer", "description": "Link expiry in number of days. Defaults to 30", "format": "int32", "nullable": true } } }, "SetUserLimitRequest": { "type": "object", "properties": { "monthly_limit": { "allOf": [ { "$ref": "#/components/schemas/Money" }, { "nullable": true } ] } }, "description": "Request that sets the monthly user limit." }, "SpendControl": { "required": [ "spend_available", "spend_limit" ], "type": "object", "properties": { "spend_limit": { "$ref": "#/components/schemas/Money" }, "spend_available": { "$ref": "#/components/schemas/Money" }, "spend_duration": { "allOf": [ { "$ref": "#/components/schemas/SpendDuration" }, { "nullable": true } ] }, "reason": { "type": "string", "nullable": true }, "lock_after_date": { "type": "string", "description": "The `lock_after_date` is in UTC.", "format": "date", "nullable": true } } }, "SpendControlRequest": { "required": [ "spend_duration", "spend_limit" ], "type": "object", "properties": { "spend_limit": { "$ref": "#/components/schemas/Money" }, "spend_duration": { "$ref": "#/components/schemas/SpendDuration" }, "reason": { "type": "string", "nullable": true }, "lock_after_date": { "type": "string", "format": "date", "nullable": true }, "parent_budget_id": { "type": "string", "description": "\nIf using the Empower platform, a new `budget` will be created for this card. You can specify a `parent_budget` that your new\n`budget` will be nested under. If `parent_budget_id` is null, we will nest the new budget under the top-level account `budget`.\n", "nullable": true }, "policy_id": { "type": "string", "nullable": true } }, "description": "\nWhen `limit_type = CARD`, `spend_controls` must be set. When `limit type = USER`, `spend_controls` must be `null`.\n" }, "SpendControlUpdateRequest": { "type": "object", "properties": { "spend_limit": { "allOf": [ { "$ref": "#/components/schemas/Money" }, { "nullable": true } ] }, "spend_duration": { "allOf": [ { "$ref": "#/components/schemas/SpendDuration" }, { "nullable": true } ] }, "reason": { "type": "string", "nullable": true }, "lock_after_date": { "type": "string", "format": "date", "nullable": true } } }, "SpendDuration": { "type": "string", "description": "\n Spend limit refresh frequency\n - MONTHLY: The spend limit refreshes every month\n - QUARTERLY: The spend limit refreshes every quarter\n - YEARLY: The spend limit refreshes every year\n - ONE_TIME: The limit does not refresh\n", "enum": [ "MONTHLY", "QUARTERLY", "YEARLY", "ONE_TIME" ] }, "TerminateCardRequest": { "required": [ "reason" ], "type": "object", "properties": { "description": { "type": "string", "description": "Description for terminating a card", "nullable": true }, "reason": { "$ref": "#/components/schemas/ChangeCardReason" } }, "description": "Parameters for terminating a card." }, "ThreeDomainSecureEnabledPreference": { "type": "string", "description": "\nWhether to enable 3-D secure protocol on this card. \n", "enum": [ "THREE_DOMAIN_SECURE_ENABLED", "THREE_DOMAIN_SECURE_DISABLED" ] }, "TitleResponse": { "required": [ "id", "name" ], "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string", "description": "Name of the title" } } }, "UpdateCardRequest": { "type": "object", "properties": { "spend_controls": { "allOf": [ { "$ref": "#/components/schemas/SpendControlUpdateRequest" }, { "nullable": true } ] }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "\nSet of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here.\nLimitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters. \n", "nullable": true } } }, "UpdateUserRequest": { "type": "object", "properties": { "status": { "allOf": [ { "$ref": "#/components/schemas/UpdateUserStatus" }, { "nullable": true } ] }, "manager_id": { "type": "string", "description": "The user id of the manager of this user", "nullable": true }, "department_id": { "type": "string", "nullable": true }, "location_id": { "type": "string", "nullable": true }, "title_id": { "type": "string", "nullable": true }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "The metadata or customized attributes of the user. Maximum number of entries: 100", "nullable": true } } }, "UpdateUserStatus": { "type": "string", "description": "\nAcceptable user status for update. To suspend a user, set status to 'disabled'. To unsuspend a user, set status to 'active'.\n", "enum": [ "ACTIVE", "DISABLED" ] }, "UserLimitResponse": { "type": "object", "properties": { "monthly_limit": { "allOf": [ { "$ref": "#/components/schemas/Money" }, { "nullable": true } ] }, "monthly_available": { "allOf": [ { "$ref": "#/components/schemas/Money" }, { "nullable": true } ] } } }, "UserOwner": { "allOf": [ { "$ref": "#/components/schemas/CardOwner" }, { "required": [ "type", "user_id" ], "type": "object", "properties": { "type": { "$ref": "#/components/schemas/OwnerType" }, "user_id": { "type": "string" } } } ] }, "UserResponse": { "required": [ "email", "first_name", "id", "last_name" ], "type": "object", "properties": { "id": { "type": "string" }, "first_name": { "type": "string", "description": "First name of the user" }, "last_name": { "type": "string", "description": "Last name of the user" }, "email": { "type": "string", "description": "Email address of the user" }, "status": { "allOf": [ { "$ref": "#/components/schemas/UserStatus" }, { "nullable": true } ] }, "manager_id": { "type": "string", "description": "The user id of the manager of this user", "nullable": true }, "department_id": { "type": "string", "nullable": true }, "location_id": { "type": "string", "nullable": true }, "title_id": { "type": "string", "nullable": true }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "The metadata or customized attributes of the user. Maximum number of entries: 100", "nullable": true }, "remote_display_id": { "type": "string", "description": "Identifier that is displayed on the IDP or HR system, eg, if OKTA identifies you as user xyz", "nullable": true } } }, "UserStatus": { "type": "string", "description": "Status of the user", "enum": [ "INVITED", "ACTIVE", "CLOSED", "DISABLED", "DELETED", "PENDING_ACTIVATION", "INACTIVE", "ARCHIVED" ] } }, "securitySchemes": { "OAuth2": { "type": "oauth2", "description": "OAuth2 security scheme", "flows": { "authorizationCode": { "authorizationUrl": "https://accounts-api.brex.com/oauth2/default/v1/authorize", "tokenUrl": "https://accounts-api.brex.com/oauth2/default/v1/token", "scopes": { "openid": "openid", "offline_access": "offline access", "users.readonly": "View user data", "users": "View and manage user data", "locations.readonly": "View location data", "locations": "View and manage location data", "departments.readonly": "View department data", "departments": "View and manage department data", "titles": "View and manage title data", "titles.readonly": "View title data", "cards": "View and manage card data", "cards.readonly": "View card data", "cards.pan": "View and Send card number data", "legal_entities": "View and manage legal entities", "legal_entities.readonly": "View legal entities" } } } } } }, "x-explorer-enabled": false }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dennisonbertram/mcp-brex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server